﻿@model Acme.Marketing.Data.Newspaper

@{
    ViewBag.Title = "RelateAds";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <h2>RelateAds</h2>


    <fieldset>
        <legend>Newspaper Ads</legend>

        <div class="display-label">
            @Html.DisplayFor(model => model.Headline)
        </div>

        <table>
            <thead>
                <tr>
                    <th></th>
                    <th>Heading</th>
                    <th>Cost</th>
                    <th>Contents</th>
                </tr>

            </thead>

            @foreach (var ad in Model.Advertisements)
            {
                <tr>
                    <td>
                        <input type="checkbox" value="@ad.AdvertisementId"/>
                    </td>
                    <td>
                        @ad.Headline
                    </td>
                    <td>
                        @ad.Cost
                    </td>
                    <td>
                        @ad.Contents
                    </td>

                </tr>
            }
        </table>
        <input type="submit" value="Save" />
    </fieldset>


    <p>
        @Html.ActionLink("Back to List", "Index")
    </p>
}